<?php


namespace Yond\LaravelDomain\Console\Domain;


use Yond\LaravelDomain\Console\DomainGenerator;

class DTOMakeCommand extends DomainGenerator
{

    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'yond:domain:dto {--name= : The name of the DTO to make}';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Make a domain dto';

    protected function getUserInputs(): array
    {
        $name = ucfirst($this->optionOrAsk('name', 'Please enter the name of the DTO class'));

        return [
            'path' => [
                'domain' => $this->domainName,
                'file' => $name.'Data',
            ],
            'stub' => [
                'domain' => $this->domainName,
                'class' => $name.'Data',
            ],
        ];
    }

    protected function getStubName(): string
    {
        return 'dto.stub';
    }

    protected function getPathStructure(): string
    {
        return 'domain/{domain}/DTOs/{file}.php';
    }
}